package io.dshubs.archives.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.dshubs.commons.mybatis.entity.BaseEntity;
import io.dshubs.commons.mybatis.entity.BaseTenantEntity;
import io.dshubs.commons.tools.validator.group.AddGroup;
import io.dshubs.commons.tools.validator.group.UpdateGroup;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * <p>
 * 密架货位表
 * </p>
 *
 * @author tan
 * @since 2021-08-17
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("archive_warehouse_location")
public class ArchiveWarehouseLocation extends BaseTenantEntity {

    private static final long serialVersionUID = 1L;



    @TableField("warehouse_id")
    @NotNull(groups = {AddGroup.class, UpdateGroup.class})
    @ApiModelProperty("库房ID")
    private Long warehouseId;


    @TableField("zone_id")
    @ApiModelProperty("库区ID")
    private Long zoneId;


    @TableField("code")
    @ApiModelProperty("货位编码")
    private String code;


    @TableField("status")
    @ApiModelProperty("货位状态 ENABLED  可用  UNENABLED不可用")
    private String status;


    @TableField("segment_no")
    @NotNull(groups = {AddGroup.class, UpdateGroup.class})
    @ApiModelProperty("巷道 （密集架）")
    private String segmentNo;


    @TableField("column_no")
    @ApiModelProperty("列,新增时应输入密集架最高列 系统自动计算货位")
    @NotNull(groups = {AddGroup.class})
    private Integer columnNo;



    @TableField("layer_no")
    @ApiModelProperty("层   新增时应输入密集架最高层 系统自动计算货位")
    @NotNull(groups = {AddGroup.class})
    private Integer layerNo;



    @TableField("usable_capacity")
    @ApiModelProperty("可使用容量")
    private Long usableCapacity;


    @TableField("location_status")
    @ApiModelProperty("货位状态  EMPTY空闲")
    private String locationStatus;


    @TableField("inout_lock")
    @ApiModelProperty("出入库锁")
    private String inoutLock;


    @TableField("updater")
    @ApiModelProperty("修改人")
    private Long updater;


    @TableField("update_date")
    @ApiModelProperty("修改时间")
    private Date updateDate;

    @TableField("del_flag")
    @ApiModelProperty(" 删除标识  0：未删除 1：删除")
    private Integer delFlag;

    @TableField(exist = false)
    @ApiModelProperty("已使用容量")
    private Integer usableHasCapacity;

}
